package edu.sctu.nieyu.day20150522;


/**
 * Created by user01 on 2015/5/24.
 */
public class TextData {
    Teacher[]  teacher = new Teacher[2];
    public Teacher[] getTeacher(){
        Teacher teacher1 = new Teacher();
        teacher1.number = 10;
        teacher1.name = "老王";
        teacher1.sex = "女";
        teacher1.profession = "副教授";
        teacher1.lesson = "大学英语";
        Student[] students = new Student[3];

        TextCourse[] tc = new TextCourse[3];
        TextCourse temp = new TextCourse();
        TextCourse temp1 = new TextCourse();
        TextCourse temp2 = new TextCourse();
        temp.course = "计算机";
        tc[0] = temp;
        temp1.course = "语文";
        tc[1] = temp1;
        temp2.course = "数学";
        tc[2] = temp2;

        for (int i = 0 ;i < students.length; i ++){
            Student student = new Student();
            student.number = 90+i;
            student.name = "小老王"+i;
            student.age = 18;
            student.grade = 60+i;
            student.address = "成都";
           student.Course = tc;

            students[i] = student;

        }
        teacher1.student = students;

        Teacher teacher2 = new Teacher();
        teacher2.number = 8;
        teacher2.name = "隔壁老王";
        teacher2.sex = "男";
        teacher2.profession = "教授";
        teacher2.lesson = "大学计算机";

        TextCourse[] tc1 = new TextCourse[3];
        TextCourse temp3 = new TextCourse();
        TextCourse temp4 = new TextCourse();
        TextCourse temp5 = new TextCourse();
        temp3.course = "计算机";
        tc1[0] = temp3;
        temp4.course = "语文";
        tc1[1] = temp4;
        temp5.course = "物理";
        tc1[2] = temp5;
        Student[] students1 = new Student[3];
        for (int i = 0 ;i < students.length; i ++){
            Student student = new Student();
            student.number = 102+i;
            student.name = "老王王"+i;
            student.age = 18;
            student.grade = 62+i;
            student.address = "成都";
            student.Course = tc1;
            students1[i] = student;
        }
        teacher2.student = students1;
        this.teacher[0] = teacher1;
        this.teacher[1] = teacher2;
        return this.teacher;
    }





}
